<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>利用函数判断闰年</title>
		<script type="text/javascript">
			function getLeapYear(year) {
				var flag = false;
				if(year % 4 == 0 && year % 100 !=0 || year % 400 == 0) {
					flag = true;
				}
				return flag ? year +'是闰年' : year + '不是闰年';
			}
			console.log(getLeapYear(1999))
		</script>
	</head>
	<body>
	</body>
</html>
